package com.kmzx.one.project.service.impl;

import com.kmzx.one.project.mapper.NoticeMapper;
import com.kmzx.one.project.mapper.SimpleMapper;
import com.kmzx.one.project.others.dto.BannerInfo;
import com.kmzx.one.project.others.dto.NoticeInfo;
import com.kmzx.one.project.service.SimpleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SimpleServiceImpl implements SimpleService {

    @Autowired
    private SimpleMapper simpleMapper;


    @Autowired
    NoticeMapper noticeMapper;

    @Override
    public List<BannerInfo> findAllBanners() {
        List<BannerInfo> infos = simpleMapper.selectAllBanners();
        return infos;
    }

    @Override
    public List<NoticeInfo> findAllNoticeInfo() {
        return null;
    }

    @Override
    public List<NoticeInfo> findNoticeInfoByType(String type) {
        List<NoticeInfo> infos = noticeMapper.selectNoticeInfo(type);
        return infos;
    }

    @Override
    public List<NoticeInfo> findNoticeByTwo(String type, String typeId) {
        List<NoticeInfo> infos = noticeMapper.selectNoticeByTwo(type,typeId);
        return infos;
    }

    @Override
    public void confirmNoticeUser(String userId, String msgId) {

    }
}
